package io.gitee.yth.design.pattern.test.core.pattern.structural.flyweight.code;

/**
 * @author yth
 * @since 2023-04-27-17:37
 */
public class ConcreteWebSite extends AbstractWebSite {

    public enum Category {
        BLOG,
        NEWS
    }

    private final Category category;

    public ConcreteWebSite(Category category) {
        this.category = category;
    }

    public Category getCategory() {
        return category;
    }

    @Override
    public void postMsg(User user, String msg) {
        System.out.println(user + " posting " + this.category
                + " in website@" + this.hashCode()
                + " : " + msg);
    }

}
